﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace 电脑信息采集台账导出_NET4._5_Win7特别版
{
    /// <summary>
    /// MyComBox.xaml 的交互逻辑
    /// </summary>
    public partial class MyComBox : UserControl
    {
        public MyComBox()
        {
            InitializeComponent();
        }
        public string TitleName
        {
            get { return (string)GetValue(TitleNameProperty); }
            set { SetValue(TitleNameProperty, value); }
        }

        // Using a DependencyProperty as the backing store for TitleName.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TitleNameProperty =
            DependencyProperty.Register("TitleName", typeof(string), typeof(MyComBox), new PropertyMetadata(""));



        public ObservableCollection<string> ItemSource
        {
            get { return (ObservableCollection<string>)GetValue(ItemSourceProperty); }
            set { SetValue(ItemSourceProperty, value); }
        }

        // Using a DependencyProperty as the backing store for ItemSource.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ItemSourceProperty =
            DependencyProperty.Register("ItemSource", typeof(ObservableCollection<string>), typeof(MyComBox), new PropertyMetadata(null));



        public string SelectItem
        {
            get { return (string)GetValue(SelectItemProperty); }
            set { SetValue(SelectItemProperty, value); }
        }

        // Using a DependencyProperty as the backing store for SelectItem.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SelectItemProperty =
            DependencyProperty.Register("SelectItem", typeof(string), typeof(MyComBox), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));



        public int SelectedIdex
        {
            get { return (int)GetValue(SelectedIdexProperty); }
            set { SetValue(SelectedIdexProperty, value); }
        }

        // Using a DependencyProperty as the backing store for SelectedIdex.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SelectedIdexProperty =
            DependencyProperty.Register("SelectedIdex", typeof(int), typeof(MyComBox), new PropertyMetadata(0));


    }
}
